import React, { useState, Fragment } from "react";
// 函数式组件 Map
export default function App() {
  const [arr, setArr] = useState(["张三", "程少商", "凌不疑"]);
  return (
    <ul>
      {arr.map((item, index) => {
        return (
          <Fragment key={index}>
            <li>{item}</li>
          </Fragment>
        );
      })}
    </ul>
  );
}
